4 minutos atrás, Josegvb disse:
bool Monster::selectTarget(Creature* creature){#ifdef __DEBUG__ std::cout << "Selecting target... " << std::endl;#endif if(!isTarget(creature)) return false; if (isPassive() && !hasBeenAttacked(creature->getID())) { return false; } if(!isHostile()) return false; std::string value; if(getStorage(505, value) && value != "-1") { if(creature->isSummon()){ if(value != creature->getMaster()->getName()) return false; }else if(value != creature->getName()) //&& value != "0"){ -- se bugar return false; } CreatureList::iterator it = std::find(targetList.begin(), targetList.end(), creature); if(it == targetList.end()) { //Target not found in our target list.#ifdef __DEBUG__ std::cout << "Target not found in targetList." << std::endl;#endif return false; } if((isHostile() || isSummon()) && setAttackedCreature(creature) && !isSummon()) Dispatcher::getInstance().addTask(createTask( boost::bind(&Game::checkCreatureAttack, &g_game, getID()))); return setFollowCreature(creature, true);}
Apaga
if(!isHostile()) return false;




info
Grupo: Marquês
Registrado: 23/09/12
Posts: 1k
Reputação: +87
Gênero: Masculino
bool Monster::selectTarget(Creature* creature){#ifdef __DEBUG__ std::cout << "Selecting target... " << std::endl;#endif if(!isTarget(creature)) return false; if (isPassive() && !hasBeenAttacked(creature->getID())) { return false; } if(!isHostile()) return false; std::string value; if(getStorage(505, value) && value != "-1") { if(creature->isSummon()){ if(value != creature->getMaster()->getName()) return false; }else if(value != creature->getName()) //&& value != "0"){ -- se bugar return false; } CreatureList::iterator it = std::find(targetList.begin(), targetList.end(), creature); if(it == targetList.end()) { //Target not found in our target list.#ifdef __DEBUG__ std::cout << "Target not found in targetList." << std::endl;#endif return false; } if((isHostile() || isSummon()) && setAttackedCreature(creature) && !isSummon()) Dispatcher::getInstance().addTask(createTask( boost::bind(&Game::checkCreatureAttack, &g_game, getID()))); return setFollowCreature(creature, true);}Editado Julho 1 por Josegvb